Skip to content

Fix #25848: Crash when dragging item from "More" palette to parent palette#26266

Merged
mathesoncalum merged 1 commit intomusescore:masterfrom
mathesoncalum:25848-more_palette_crash
Jan 30, 2025
Merged

Fix #25848: Crash when dragging item from "More" palette to parent palette#26266
mathesoncalum merged 1 commit intomusescore:masterfrom
mathesoncalum:25848-more_palette_crash

Conversation

@mathesoncalum
Copy link
Contributor

@mathesoncalum mathesoncalum commented Jan 28, 2025

Resolves: #25848

It took me a while to figure out some consistent repro steps for this one but I got there in the end. For the crash to occur, the “more” popup needs to disappear mid-drag. This can happen when the number of rows changes in the parent palette, and the “more” button is shuffled out of view.

This crash was introduced with 01735eb where we placed the MoreElementsPopup inside a Loader. The problem seems to be that the drag continues to reference the MoreElementsPopup after the Loader destroys it in onClosed. My proposed solution is to defer the deactivation of the Loader until after the drag has finished (if necessary).

(Note this PR initially attempted some refactoring to PaletteTree.qml but in the end this was causing more harm than good)

@mathesoncalum mathesoncalum force-pushed the 25848-more_palette_crash branch 3 times, most recently from c0fc921 to 77d08a4 Compare January 29, 2025 18:57
@mathesoncalum mathesoncalum force-pushed the 25848-more_palette_crash branch from 77d08a4 to 0b33059 Compare January 30, 2025 08:54
@zacjansheski
Copy link
Contributor

Tested on MacOS 15, Windows 11, Ubuntu 22.04.3. Approved
#25848 FIXED

@mathesoncalum mathesoncalum merged commit ca8b123 into musescore:master Jan 30, 2025
11 checks passed
@mathesoncalum mathesoncalum deleted the 25848-more_palette_crash branch January 30, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dragging pallet component from 'More' sub-pallet to main pallet, causes MuseScore to close ungracefully

3 participants